<form method="post" enctype="multipart/form-data" target="_blank" id="form-order">
    <div class="table-responsive">
        <table class="table table-bordered table-hover">
            <thead>
                <tr>
                    <th style="width: 1px;" class="text-center">
                        <!--
                            <input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', this.checked);">
                        -->
                    </th>
                    <th class="text-center">
                        <a href="javascript:sort('goods_id');">ID</a>
                    </th>
                    <th class="text-center">
                        <a href="javascript:;">自提点名称</a>
                    </th>
                    <th class="text-center">
                        <a href="javascript:;">自提点地址</a>
                    </th>
                    <th class="text-center">
                        <a href="javascript:;">自提点电话</a>
                    </th>
                    <th class="text-center">
                        <a href="javascript:;">自提点联系人</a>
                    </th>
                    <th class="text-center">
                        <a href="javascript:;">省</a>
                    </th>
                    <th class="text-center">
                        <a href="javascript:;">市</a>
                    </th>
                    <th class="text-center">
                        <a href="javascript:;">区</a>
                    </th>
                    <th class="text-center">
                        <a href="javascript:;">供应商</a>
                    </th>
                    <th class="text-center">操作</th>
                </tr>
            </thead>
            <tbody>
            <volist name="pickList" id="list">
                <tr>
                    <td class="text-center">
                        <!-- <input type="checkbox" name="selected[]" value="6">-->
                        <input type="hidden" name="shipping_code[]" value="flat.flat">
                    </td>
                    <td class="text-center">{$list.pick_id}</td>
                    <td class="text-left">{$list.pick_name|getSubstr=0,33}</td>
                    <td class="text-left">{$list.pick_address|getSubstr=0,33}</td>
                    <td class="text-left">{$list.pick_phone}</td>
                    <td class="text-left">{$list.pick_contact}</td>
                    <td class="text-left">{$list.province_name}</td>
                    <td class="text-left">{$list.city_name}</td>
                    <td class="text-left">{$list.district_name}</td>
                    <td class="text-left">{$list.supplier_name|default='无供应商'}</td>
                    <td class="text-left">
                        <a href="{:U('Admin/Pick/editAddress',array('pick_id'=>$list['pick_id']))}" class="btn btn-primary" title="编辑"><i class="fa fa-pencil"></i></a>
                        <a href="javascript:;" onclick="del('{$list[pick_id]}')" class="btn btn-danger" title="删除"><i class="fa fa-trash-o"></i></a>
                    </td>
                </tr>
            </volist>
            </tbody>
        </table>
    </div>
</form>
<div class="row">
    <div class="col-sm-3 text-left"></div>
    <div class="col-sm-9 text-right">{$page}</div>
</div>
<script>
// 点击分页触发的事件
    $(".pagination  a").click(function () {
        cur_page = $(this).data('p');
        ajaxGetTable('search-form2', cur_page);
    });
// 删除操作
    function del(id) {
        if (!confirm('确定要删除吗?'))
            return false;
        $.ajax({
            url: "/index.php?m=Admin&c=Pick&a=del&pickup_id=" + id,
            success: function (v) {
                var v = eval('(' + v + ')');
                if (v.hasOwnProperty('status') && (v.status == 1))
                    ajax_get_table('search-form2', cur_page);
                else
                    layer.msg(v.msg, {
                        icon: 2,
                        time: 1000
                    });
            }
        });
        return false;
    }
</script>
